<a href='https://github.com/angular/angular.js/edit/v1.4.x/docs/content/error/$injector/modulerr.ngdoc?message=docs(error%2Fmodulerr)%3A%20describe%20your%20change...' class='improve-docs btn btn-primary'><i class="glyphicon glyphicon-edit">&nbsp;</i>Improve this Doc</a>


<h1>Error: $injector:modulerr
  <div><span class='hint'>Module Error</span></div>
</h1>

<div>
    <pre class="minerr-errmsg" error-display="Failed to instantiate module {0} due to:
{1}">Failed to instantiate module {0} due to:
{1}</pre>
</div>

<h2>Description</h2>
<div class="description">
  <p>This error occurs when a module fails to load due to some exception. The error
message above should provide additional context.</p>
<h3 id="using-ngroute-">Using <code>ngRoute</code></h3>
<p>In AngularJS <code>1.2.0</code> and later, <code>ngRoute</code> has been moved to its own module.
If you are getting this error after upgrading to <code>1.2.x</code> or later, be sure that you&#39;ve
installed <a href="api/ngRoute"><code>ngRoute</code></a>.</p>
<h3 id="monkey-patching-angular-s-ng-module">Monkey-patching Angular&#39;s <code>ng</code> module</h3>
<p>This error can also occur if you have tried to add your own components to the <code>ng</code> module.
This has never been supported and from <code>1.3.0</code> it will actually trigger this error.
For instance the following code could trigger this error.</p>
<pre><code class="lang-js">angular.module(&#39;ng&#39;).filter(&#39;tel&#39;, function (){});
</code></pre>
<p>Instead create your own module and add it as a dependency to your application&#39;s top-level module.
See <a href="https://github.com/angular/angular.js/issues/9692">#9692</a> and
<a href="https://github.com/angular/angular.js/issues/7709">#7709</a> for more information</p>

</div>


